﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace EPiServer.Models
{
    public class Document : BaseModel
    {
        public string DocumentInternalPath { get; set; }
        public bool IsDocumentPageType { get; set; }

        public string Extension
        {
            get
            {
                return VirtualPathUtility.GetExtension(DocumentInternalPath).Substring(1);
            }   
        }

        public string Name
        {
            get
            {
                return Uri.UnescapeDataString(VirtualPathUtility.GetFileName(DocumentInternalPath));
            }
        }
    }
}